package ru.rchervot.sanasar.client.model;

import com.google.gwt.user.client.rpc.IsSerializable;

public class QueryParameter implements IsSerializable {
	private String key;
	private String value;
	private String type;
	
	public QueryParameter() {
	}
	
	public QueryParameter(String key, String value, String type) {
		this.key = key;
		this.value = value;
		this.type = type;
	}

	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	public boolean equals(Object o) {
		if (o == null) return false;
		
		if (! (o instanceof QueryParameter)) return false;
		
		QueryParameter qp = (QueryParameter) o;
		
		return key == null ? qp.getKey() == null : key.equals(qp.getKey());
	}
	
	public int hashCode() {
		int result = 17;
		result = 37 * result + (key == null ? 0 : key.hashCode());
		return result;
	}
	
}
